package com.czxy.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Student {
  @TableId(value = "stuid",type = IdType.AUTO)
  private Integer stuid;
  private String stuname;
  private Integer age;
  private String sex;
  private Integer classid;
  @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
  private Date birthday;
  private Integer createId;
  private Integer isDelete;

  //不需要与数据库对应
  @TableField(exist = false)
  private Classes classes;



  @TableField(exist = false)
  private List<Course> courseList;

  @TableField(exist = false)
  private Teacher teacher;

  @TableField(exist = false)
  private List<Integer>  courseIdList = new ArrayList<>();

  /**
   * 用来接收页面传递过来的id值
   */
  @TableField(exist = false)
  private List<String> cityIdList;

  /**
   * 用来与数据库进行对应的
   */
  @TableField(value = "city_ids")
  private String cityIds;

}